import {createRouter, createWebHashHistory} from "vue-router";
import login from '../View/Login/login.vue'
import Index from '../View/Index/Index.vue'
import MyCollect from '../View/MyCollect/MyCollect.vue'
import PublicCollection from '../View/PublicCollection/PublicCollection.vue'
import RecycleBin from '../View/RecycleBin/RecycleBin.vue'
import layout from '../layout/index.vue'


const routes = [
  {
    path: "/:any(.*)?",
    name: 'login',
    component:login,
  },
  {
    path: "/home",
    name: 'home',
    component: layout,
    children: [
      {
        path: "",
        name: 'index',
        component: Index,
      },
      {
        path: "/MyCollect",
        name: 'MyCollect',
        component: MyCollect,
      },
      {
        path: "/PublicCollection",
        name: 'PublicCollection',
        component: PublicCollection,
      },
      {
        path: "/RecycleBin",
        name: 'RecycleBin',
        component: RecycleBin,
      },
    ]
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
